package com.taxinfo.utils;

import java.io.Serializable;
import java.util.Date;

public class Tools implements Serializable {
    private Date validFrom;
    private Date validTo;
    private String signature;

    public Tools(Date validFrom, Date validTo, String signature) {
        this.validFrom = validFrom;
        this.validTo = validTo;
        this.signature = signature;
    }

    public Date getValidFrom() {
        return validFrom;
    }

    public Date getValidTo() {
        return validTo;
    }

    public String getSignature() {
        return signature;
    }

    public boolean isValid() {
        Date now = new Date();
        return now.after(validFrom) && now.before(validTo);
    }
}